package com.mdd.common.enums;

import com.google.common.collect.Maps;

import java.util.Map;

public enum ShowEnum {

    IS_SHOW(1, "显示"),
    NOT_SHOW(0, "不显示");

    private final int code;
    private final String desc;

    ShowEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * 获取状态码
     *
     * @return Long
     * @author fzr
     */
    public int getCode() {
        return this.code;
    }

    /**
     * 获取提示
     *
     * @return String
     * @author fzr
     */
    public String getDesc() {
        return this.desc;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = Maps.newHashMap();
        for (ShowEnum codeEnum : ShowEnum.values()) {
            map.put(codeEnum.code, codeEnum.desc);
        }
        return map;
    }
}
